from socket import *
serverPort = 13000

serverSocket = socket(AF_INET, SOCK_STREAM)
serverSocket.bind(('192.168.124.17', serverPort))
serverSocket.listen(1)

print('The server is ready to receive')

while True:
    connectionSocket, addr = serverSocket.accept()
    '''
    During the three-way handshake, the client process knocks on the welcoming door of the server process. 
    When the server “hears” the knocking, it creates a new door 
    --- more precisely, a new socket that is dedicated to that particular client.
    '''
    sentence = connectionSocket.recv(1024).decode()
    capitalizedSentence = sentence.upper()
    connectionSocket.send(capitalizedSentence.encode())

    connectionSocket.close()

